chebft1 Subroutine

public subroutine chebft1(a, b, c, n, func)

Chebyshev fit: Given a function func, lower and upper limits of the interval [a,b], and a maximum degree n, this routine computes the n coefficients c(k) such that func(x) approximately = SUMM_(k=1)^(k=n)[c(k)*T(k-1)(y)]-c(1)/2, where y and x are related by (5.8.10). This routine is to be used with moderately large n (e.g., 30 or 50), the array of c’s subsequently to be truncated at the smaller value m such that c(m+1) and subsequent elements are negligible. Parameters: Maximum expected value of n, and ð.

Arguments

Type IntentOptional Attributes Name
real(kind=wp) :: a
real(kind=wp) :: b
real(kind=wp) :: c(n)
integer :: n
real :: func